{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Day21 进阶构图元素——一页多图（中）\n",
    "\n",
    "　　在上一天的日程中，我们学习到如何利用`subplots()`来初步创建若干行若干列规整的网格子图，而今天我们将来继续学习`matplotlib`中更为进阶的创建及调整子图的方法。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "execution": {
     "iopub.execute_input": "2020-11-09T10:23:53.509669Z",
     "iopub.status.busy": "2020-11-09T10:23:53.508671Z",
     "iopub.status.idle": "2020-11-09T10:23:53.687220Z",
     "shell.execute_reply": "2020-11-09T10:23:53.687220Z",
     "shell.execute_reply.started": "2020-11-09T10:23:53.509669Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "matplotlib版本： 3.3.2\n"
     ]
    }
   ],
   "source": [
    "import matplotlib;print('matplotlib版本：', matplotlib.__version__)\n",
    "import matplotlib.pyplot as plt # 从matplotlib中导入我们最经常使用的pyplot子模\n",
    "\n",
    "plt.rcParams['font.sans-serif'] = ['SimHei'] # 设定默认字体为SimHei以解决中文显示乱码问题\n",
    "plt.rcParams['axes.unicode_minus'] = False # 解决图像负号'-'不正常显示的问题"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "　　在一开始我们先来介绍一下前一天的日程中，课后题目部分使用到的针对`Figure`对象的`subplots_adjust()`方法，我们主要使用到的参数为`wspace`与`hspace`。\n",
    "\n",
    "　　先来看一个比较明显的例子，在默认的情况下，当我们创建完一个**2x2**的多子图之后，再给每张子图都设置标题，可以看到标题以及刻度标签之间发生了一些拥挤遮挡情况："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "execution": {
     "iopub.execute_input": "2020-11-09T10:23:53.688192Z",
     "iopub.status.busy": "2020-11-09T10:23:53.688192Z",
     "iopub.status.idle": "2020-11-09T10:23:53.933569Z",
     "shell.execute_reply": "2020-11-09T10:23:53.933569Z",
     "shell.execute_reply.started": "2020-11-09T10:23:53.688192Z"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAARAAAAEGCAYAAACthcqTAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAAAXiklEQVR4nO3df5BddX3G8feTEBACiQHTxEQh7UihRKA2K0KGhCUjw88ZN1oDDoMdk5m0iNaasTNY15mCQTvjNC0NSsloR9yiuEXMOJSISWElMaAkmoAEGBQEafiVTgQTI2jy6R/nbHJ39969534598duntfMnd177vdczslz+ey5537v+SggMDNLcAQAEWrzdpjZWCPFhHZvg5mNXS4gZpbMBcTMkrmAmFkyFxAzS+YCUoekr0m6KGG9CZKOHLbsqPK2zMrknNMc0e4NGANey29I2gocBfwhf+xo4PGIeJ+kXwDP58tPB5YB10o6GjgeeBo4EujKn+tvgH8EngM+GBFPt2RvrJam5Jw/35XAeyPiI63YkVZyAalB0hTgBOAYYLqkEyNi3iirvAbcCRwAZgKbI6JL0hXAKRFxXcVznw58FvgL4CTgJuDS5uyJjaaZOefPfxnwJWBtM7a/3VxAapsPfAJYAMwBzgOuGWX8BGArsB/4DSBJPwd+SHbnB8D3I+IGoAf4ekTsBHZKeoukyRGxt0n7YrU1M2eAjwCfIztaGXdcQGqIiO/lL4ZXgC8Cr0vaAfyW7PA2gNeByWQvwKeBwRfN4MzeV4GP5bf1wB/ly98GDFT853aSHYnsaNLuWA1NzhngL4G/avJutI0LyOguBSYB/wL8fUScBiCpF9gVEf+e3z8T2ED2Vwmyv1KnkR3mTgAWA//Goe8dTSR70Q3aC7y5mTtio2pWzkRESOP3myIuIKP7FPBjoA+4WtLgCwUASZ8ne3/7G+AJsr9UNwF/C+wiKxRvB57NVxk8O7+boQXjaLIXobVHs3Ie9/wxbg2SPgn8Cvgp8DOyv1IfBX5fMewA8KWIeIrssHY9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akR8Pn9s8BLqSRmDcx4LKnJuSCmNpWqMKbKedQZnbEmKHIGsBTZKmgVcDFwhaWVE9I4y5mwgqiyzzrQWZ2wpAiIiGO0GTCPrSjezkTFF1qsYu7zemLFyG4v7Uiuryn15oxmP1X8b70uNG0ShznRmZiNI4ZmoZpas5QUkdVZrJ6q3nZKOkPRs3ox6QNLprd7GoiTNkLRxlMcnSbor39+lBZ7POXegsnNuaQFJndXaym0squB2nkH28Wh3fnuktVtZTN48/VayeR21fBzYku/vZZKOG+X5nHMHKjtnaP0RSDdps1o7UTf1t/NsYLGkTZJuk1SomXkb7AcuJ5sMVks3h/Z3MzDa/IfKsc65c5Sdc8sLyPCZizMSx3SCItv5EHBeRJwL/Bq4pDWb1piIeDUiXqkzrJFcnHMHakLOLS8gqbNaO1GR7Xw4Ip7Pf38c6MjD9IIaycU5j10N5dLq0FJnPHaiItvZJ+lMSROBxcD2Fm1bMzSSi3MeuxrLpchEshInq0wh+8ddBTyWb+DKOmOmtnuSzRvYl3cCDwOPADe0e5sL7NNA/nMR8LFhj50EPArcSHbIPtE5H945t2UiWX4m+ALg/oh4IXVMJxgr21mWfMr6ucA9Uee9tHMeuwrnLHkmqpkl8kxUM3sjXEDMLJkLiJklcwExs2QuIGaWLPsUxswswf8DtOwT0HGrdEAAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 288x288 with 4 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "fig, ax = plt.subplots(nrows=2, ncols=2, figsize=(4, 4), \n",
    "                       edgecolor='red', linewidth=2)\n",
    "\n",
    "ax = ax.flatten() # 用numpy的方式展平二维数组格式的Axes对象数组\n",
    "\n",
    "for i in range(ax.__len__()):\n",
    "    \n",
    "    ax[i].set_title(f'标题{i}')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "　　这时我们可以通过设置`wspace`与`hspace`来微调子图之间横向以及纵向的比例距离："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "execution": {
     "iopub.execute_input": "2020-11-09T10:23:53.934532Z",
     "iopub.status.busy": "2020-11-09T10:23:53.934532Z",
     "iopub.status.idle": "2020-11-09T10:23:54.149958Z",
     "shell.execute_reply": "2020-11-09T10:23:54.149230Z",
     "shell.execute_reply.started": "2020-11-09T10:23:53.934532Z"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAARAAAAEGCAYAAACthcqTAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAAAWJ0lEQVR4nO3dfYxddZ3H8fenpUXsSi1Yi4CoiQTSCKzLKA8WuBAIjwnWXQFD0AhJdxGUdaMJKiYLFk00WxeXB23WRGzQLD5NDBGQBivFgjKNhfJQ4wMWWWikGx4UBaR894/fKb1z587Mub8559x7p59XctO5Z865/Z3bT75zeuZ3vz8FBGZmGfYAIEJ9HoeZDRsp5vR7DGY2vFxAzCybC4iZZXMBMbNsLiBmls0FpIOkb0g6LeO4OZLmd2zbs7qRWZOcg3L26PcABtCLxQNJG4E9gZeL7+0FbImIsyX9Fniy2H4YcBFwuaS9gH2AR4H5wEjxWv8C/DvwOPD+iHi0kbOxXLXkoHi984GTI+LDTZxInVxACpL2BvYFXgsslnRQRBw5xSEvAt8HXgH2AzZExIik84BDIuLKttc+DPgs8A/AW4BrgTPrORObiTpzULz+WcB1wGgd42+aC8guxwKXAccBbwVOAC6ZYv85wEZgB/AnQJJ+A/yM9OSnwI8j4mrgvcA3I+IJ4AlJb5C0ICKer+lcLF+dOQD4MPA50tXK0HMBKUTEbcU/9rPAl4CXJD0M/IV0+RrAS8ACUsAeBXaGYudM3ueAS4vHHcAbi+0HAuva/ronSFciD9d0Opap5hwA/BPwoZpPozEuIOOdCcwDvgx8MiKWAki6AtgeEV8tnh8BrCX91IH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+qCMHTV+BtMibzTgIWkw/rqOB5ZLulnSTpFJLhzZgB3AuaSLXZFrsOr8NQJ3zGdr/LuegOZXnoOkC0jkrcUnmPv1QZlz3ASdExDLgGeCMZoY2tYh4LiKenWa3Jt9356AP6shB0wUkdzbjICgzrgci4sni6y3AQFx2l9Tk++4cDK6e3vem/1FyZzMOgjLjWiPpCElzgeXA/Q2NrQpNvu/OweDq7X0vM5Gswskqe5PezFXAI8UAV06zz8J+T7LpYezvAB4ANgNX93vMXc5hXfHnScClHd97C/AQcA3pEnyuc+AcTJmDfkwkK+4EnwLcFRHbcvfph0EdV1WK6ebLgNtj+v8rz/Tvcg4GVOkcSJ6JamaZPBPVzGbCBcTMsrmAmFk2FxAzy+YCYmbZ0m9hzMwy/D9qWgjPAxFUpwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 288x288 with 4 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "fig, ax = plt.subplots(nrows=2, ncols=2, figsize=(4, 4), \n",
    "                       edgecolor='red', linewidth=2)\n",
    "\n",
    "# 使用wspace调整横向上不同子图之间的比例距离\n",
    "# 使用hspace调整纵向上不同子图之间的比例距离\n",
    "fig.subplots_adjust(wspace=0.4, hspace=0.4)\n",
    "\n",
    "ax = ax.flatten() # 用numpy的方式展平二维数组格式的Axes对象数组\n",
    "\n",
    "for i in range(ax.__len__()):\n",
    "    \n",
    "    ax[i].set_title(f'标题{i}')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "　　了解了`subplots_adjust()`的作用之后，我们来学习今天的重点——利用`Figure`对象的`add_gridspec()`与`add_subplot`方法来灵活添加子图。\n",
    "  \n",
    "　　首先我们按照惯例利用`subplots()`来创建默认含有1个`Axes`对象的图床，先利用`Axes`对象的`remove()`方法将默认创建出的`Axes`对象移除，接着我们首先使用`Figure`对象的`add_gridspec()`方法打好指定行列数的“网格”，只不过这一步之后网格并没有被激活，而我们可以利用行列索引和`add_subplot`方法对指定网格子图进行激活："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "execution": {
     "iopub.execute_input": "2020-11-09T10:23:54.150973Z",
     "iopub.status.busy": "2020-11-09T10:23:54.149958Z",
     "iopub.status.idle": "2020-11-09T10:23:54.311559Z",
     "shell.execute_reply": "2020-11-09T10:23:54.311559Z",
     "shell.execute_reply.started": "2020-11-09T10:23:54.149958Z"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAUIAAAEwCAYAAADCR3hWAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAAAS7klEQVR4nO3cb4hc9dnG8et6Zq2GTVYCJiupYIWGhnQ10MyLJWzIkCYvKkK7QqNvxGIhYiFQiuVpaV6V+FgoFF+I0qWRSkhDAk2siO2DbRxMulqcgSZa9SEUVLpRiTQmjZRUt/fzYo/JdjO7e2Z25szM/r4fOPiLc59z7pnNXjn/fuOIEACk7L+63QAAdBtBCCB5BCGA5BGEAJJHEAJIHkEIIHkEIYDk5QpC28O2Tyzw+nW2n7M9afuB9rUHAJ23aBDaXi3paUmDC5TtkVSLiC2S7rK9qk39AUDHDeSomZZ0j6TfLFBTkfSDbDwpqSzpxdkFtndL2i1Jg4ODmzds2NBsr5ijXq9/GBFrut0H0O8WDcKIuChJthcqG5Q0lY0vShpusJ0JSROSVC6Xo1arNdsr5rD9Trd7AJaDdt0suSRpRTZe2cbtAkDHtSuw6pLGsvEmSW+3absA0HF5rhH+B9vbJW2MiMdn/e+nJT1ve6ukjZL+1Kb+AKDjch8RRkQl++/xOSGoiHhH0k5Jf5S0IyKm29kkAHRS00eE84mIs5KOtGt7AFAUbmoASB5BCCB5BCGA5BGEAJJHEAJIHkEIIHkEIYDkEYQAkkcQAkgeQQggeQQhgOQRhACSRxACSB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6cv31ac08rzmfPZJq2Xu5y/aq+QoJQqA4FV0726SVmk7Ks/9RSeO2T9o+aLsbT59MS7pHMw+rz6eiq+9lUtK8D4MThEBx5s42GW6xppPy7P9VSdsiYkzSR5LuLKa1qyLiYkRcWKQs92dJEALF6YcZKXn2fzoi3svGb0nq1S+UyP1ZEoRAcfphRkqe/R+wvcl2SdK4pFMF9das3J8lzxECBbE9JOmEpD8om5Ei6ZuzZ6Q0qBnNcQpYdI8jkn4lyZKejYgfFdXfXLarEVGxvV3Sxoh4fNZrt0p6XtLvJW3RzGc53XA7BCFQnH6YkdLt/bdTNsVxTNL/LvQPCkEIIHlcIwSQPIIQQPIIQgDJIwgBJI8gBJC8/wehc8Pd2+AQkwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 360x360 with 3 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "fig, _ = plt.subplots(figsize=(5, 5))\n",
    "_.remove()\n",
    "\n",
    "gs = fig.add_gridspec(ncols=3, nrows=3)\n",
    "\n",
    "# 譬如我们按照行列位置单独激活对角线上的3个子图\n",
    "ax1 = fig.add_subplot(gs[0, 0])\n",
    "ax1.text(0.5, 0.5, str([0, 0]), va='center', ha='center')\n",
    "\n",
    "ax2 = fig.add_subplot(gs[1, 1])\n",
    "ax2.text(0.5, 0.5, str([1, 1]), va='center', ha='center')\n",
    "\n",
    "ax3 = fig.add_subplot(gs[2, 2])\n",
    "ax3.text(0.5, 0.5, str([2, 2]), va='center', ha='center');"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "　　最有意思的是，我们可以利用切片索引创建出连续合并的子图："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "execution": {
     "iopub.execute_input": "2020-11-09T10:23:54.313520Z",
     "iopub.status.busy": "2020-11-09T10:23:54.313520Z",
     "iopub.status.idle": "2020-11-09T10:23:54.520002Z",
     "shell.execute_reply": "2020-11-09T10:23:54.520002Z",
     "shell.execute_reply.started": "2020-11-09T10:23:54.313520Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Text(0.5, 0.5, '分区3')"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAUIAAAEwCAYAAADCR3hWAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAAAeUElEQVR4nO3df3DU9b3v8edbfqglpC5IQRgk1KM4LR7lJgOYEAlRpD2mI+VihEEbW44ZbLGOmTuOtZa5dCKI05GpHG2Hqsfa9DZwptRbHemZOHSVmPa0ib2h2FOFP4wzLiCUKCTDUBve94+sAcIm+ZLsbrJ8Xo+ZDJvse3dfm2/2xfe7u9/vmrsjIhKyi4Y7gIjIcFMRikjwVIQiEjwVoYgET0UoIsFTEYpI8FSEIhK8SEVoZpPNbHc/548xs1fMrMnMvpG+eNKbloVI+g1YhGYWA34KjOtn7H6g2d2LgQozG5+mfHIGLQuRzBgdYaYLuBP4v/3MlAEPJ083AUXAb88cMLNqoBpg3Lhxhddee+35Zg3eDTfcAMD+/fspKirylpaWI+4+qddYGVoWEqg+HhMDGrAI3f0YgJn1NzYO+CB5+hgwOcX1bAW2AhQVFXlzc/P5ZpWksrIy4vE4ZtaW4mwtCwlWH4+JAaXrxZIO4NLk6bw0Xq+cPy0LkfOUrgdJC7Agefp64L00Xa+cPy0LkfMU5TnCs5hZOfAFd/+3M378U+BVMysFvgD8V5rySf/Gm9laLQuRoYm8RujuZcl/d/V64OHubcBi4E3gFnfvSmdIOVs8Hv/05HEtC5GhO+81wr64ewLYnq7rk8HTshA5P3oiXUSCpyIUkeCpCEUkeCpCEQmeilBEgqciFJHgqQhFJHgqQhEJnopQRIKnIhSR4KkIRSR4KkIRCZ6KUESCpyIUk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Wpmu83sx5nOk7zNIT0mzpSxIsyFPVIi3v4/A79w97Lk15+zmRF6nvf7Kd3vE+zL/UBz8r5UmNmZb7QeUcsi4m2tAp5098XAQeBLw5znUz/g9FuUhjWPmZUCU9z95RGQ526gzt1LgfFmltH3Fg71MdFbJtcIy4DtydO7OP22jvOdyaQotz8f+KqZNZrZz80syivt6dYF3En3m6T7Usbp+9IEFPVx3khYFgPelrs/4+4NyW8nAR8OZx4AMysHOuku5kwaMI+ZjQF+ArxnZrcPdx7gb8AsM7uM7r2g3s9wpqE+Js6SySLsvZfD5EHOZFKU2/8jsNDdFwAfAf+SnWinufsxd/94gLH+7stIWxaRb8vMbgRi7v774cyT3DRfBzycwRyR8wBfA/4CPAHMNbP7hzlPI3A18G3gr0B7BvOk4zFxlkwWYS7sCRHl9ve4+4Hk6b/SvbBHov7uy0hbFpFuy8wmAFuAfp/fyVKeh4Gn3f2jDGeJmmcOsDX5Fqk6YNEw59kArHH379P9OPl6BvNEFflvOpN/7LmwJ0SU2/+ZmV1vZqOArwKtWcp2vvq7LyNtWQx4W8k1sO3Ad9y9LYNZIuUBbgG+ZWZx4AYze3aY8+wHPp88XQRk8ncUJc9ngOuSj5N5wEh4X170v2l3z8gXkE93aTwJ/HcySO0AM5/NVJ4hZJwN7AH+DDyWzXwp8saT/5YDa3udNwN4G/gh3Zvzo0bqsoiY5z66N6/iya87hzNPquUwzL+f8cB/AG8AvwOmDXOeucm/vw6gAcjL5O+o97I438dE76+MvqE6F/aEGO7bT6fkrnULgP/0Xs+fjLRlMdJ+78qTW3mi6u8xcdZcJotQRCQXaM8SEQmeilBEgqciFJHgqQhFJHgqQhEJ3v8HqYRkEERCQUYAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 360x360 with 3 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "fig, _ = plt.subplots(figsize=(5, 5))\n",
    "_.remove() # 移除默认创建的Axes\n",
    "\n",
    "gs = fig.add_gridspec(ncols=3, nrows=3)\n",
    "\n",
    "# 按照切片索引随心所欲的生成连续合并的子图区域\n",
    "ax1 = fig.add_subplot(gs[:, 0])\n",
    "ax1.text(0.5, 0.5, '分区1', va='center', ha='center')\n",
    "\n",
    "ax2 = fig.add_subplot(gs[0, 1:])\n",
    "ax2.text(0.5, 0.5, '分区2', va='center', ha='center')\n",
    "\n",
    "ax2 = fig.add_subplot(gs[1:, 1:])\n",
    "ax2.text(0.5, 0.5, '分区3', va='center', ha='center')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "　　并且`add_gridspec()`中还提供了参数`width_ratios`与`height_ratios`，这两个参数可以分别指定每一行或每一列的宽度高度比例构成，以`width_ratios`为例，在前面例子的基础上我们添加`width_ratios=[2, 2, 6]`，就可以让三列宽度以**2:2:6**的比例进行布局："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "execution": {
     "iopub.execute_input": "2020-11-09T10:23:54.521963Z",
     "iopub.status.busy": "2020-11-09T10:23:54.520968Z",
     "iopub.status.idle": "2020-11-09T10:23:55.034592Z",
     "shell.execute_reply": "2020-11-09T10:23:55.034592Z",
     "shell.execute_reply.started": "2020-11-09T10:23:54.521963Z"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAUUAAAEwCAYAAAAgm2MvAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAAAofUlEQVR4nO3cf3BV9Z3/8efbULYZfmgsyI+IwFok20XYIRlBghAjqEthBxlKVZjFyhCt4LKy3Z1dYVydAoWZrlbplikzsDrIVDIDZYvt+h0cGmpMt2MQAddSEUO0BFAkhB8Dgjfv7x/3JpyEm9ybm5vLvTevx8wdbs79nM9939c5931/nHswd0dERMKuu9YFiIikEzVFEZEANUURkQA1RRGRADVFEZ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nNrM7gTx3/1/gHWCyu08ETgPTUlxTtPtPi5yARcC6dupMijjfjHR6f0p1U9TZDmHdJYdEz4DpynzimtvMbgTWAk3fQe1392OR6weBZH7lEU9N0e4/HXK6Drjb3X/bTp2p1On9KdVPRp3tENZdckj0DJiuzCfm3GbWk/DHrX9z99rI4k1mNsbMcoAHgH2prKmN+7+mOUXcBfwhRp2p1Pn9yd1TdgH6Eg7peeCPwPWpvP90uXSXHKI8zjHAilhZdGU+cdb0faAeqIhcvkv4f/LZDxwAVl6DnK66f8Jvat4GXgT+BAxPZU2RcauAWe3V2QX7VUXk31JgcavbhgL/F8nkHSAn2rL25k/5j7d1tkNYd8kh0TNgujKfdMw+0ZrMLBf4NvCuu3+cDjVdaxY+xXQi8P888h1ktGVtrp/qpigiks6y9Qt+EZGEqCmKiASoKYqIBKgpiogEqCmKiAT8fx4s8SMHGVGAAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 360x360 with 9 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "fig, _ = plt.subplots(figsize=(5, 5))\n",
    "_.remove()\n",
    "\n",
    "gs = fig.add_gridspec(ncols=3, nrows=3, width_ratios=[2, 2, 6])\n",
    "\n",
    "# 利用gs的nrows与ncols属性可以得到初始网格的行数与列数\n",
    "for row in range(gs.nrows):\n",
    "    for col in range(gs.ncols):\n",
    "        ax = fig.add_subplot(gs[row, col])\n",
    "        ax.text(0.5, 0.5, f'分区{(row, col)}', va='center', ha='center')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 课后测验：\n",
    "\n",
    "　　接下来的时间交给你们，通过本节课的内容，请你利用今天所学到的灵活布局子图相关知识，结合过往所学的一些知识，还原出下图的样子：\n",
    "\n",
    "<center>\n",
    "    <img src=\"imgs/课后题目.png\" width=300></img>\n",
    "</center>"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "* 请在今天对应的帖子下回复你的代码和结果"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAASgAAAEhCAYAAADMCD3RAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAAAEgklEQVR4nO3XQUojURhG0VeNO0g59q1B3P8KSteg484equcSGwPGupBzhj81+Ah64S37vg+Aoj9HDwD4ikABWQIFZAkUkCVQQJZAAVkP13y8rus+57zRFC5Z13Wcz+ejZ8BNvb6+nvd9f/x8vypQc86xbdvPrQIYYyzL8nHp7okHZAkUkCVQQJZAAVkCBWQJFJAlUECWQAFZAgVkCRSQJVBAlkABWQIFZAkUkCVQQJZAAVkCBWQJFJAlUECWQAFZAgVkCRSQJVBAlkABWQIFZAkUkCVQQJZAAVkCBWQJFJAlUECWQAFZAgVkCRSQJVBAlkABWQIFZAkUkCVQQJZAAVkCBWQJFJAlUECWQAFZAgVkCRSQJVBAlkABWQIFZAkUkCVQQJZAAVkCBWQJFJAlUECWQAFZAgVkCRSQJVBAlkABWQIFZAkUkCVQQJZAAVkCBWQJFJAlUECWQAFZAgVkCRSQJVBAlkABWQIFZAkUkCVQQJZAAVkCBWQJFJAlUECWQAFZAgVkCRSQJVBAlkABWQIFZAkUkCVQQJZAAVkP13y8ruutdvCFdVnGPHrEnXk/ncac8+gZ9+b50vGqQJ3P55+ZwrfNMcZ29Ig78zLn2Da/+m9aluXt0t0TD8gSKCBLoIAsgQKyBArIEiggS6CALIECsgQKyBIoIEuggCyBArIECsgSKCBLoIAsgQKyBArIEiggS6CALIECsgQKyBIoIEuggCyBArIECsgSKCBLoIAsgQKyBArIEiggS6CALIECsgQKyBIoIEuggCyBArIECsgSKCBLoIAsgQKyBArIEiggS6CALIECsgQKyBIoIEuggCyBArIECsgSKCBLoIAsgQKyBArIEiggS6CALIECsgQKyBIoIEuggCyBArIECsgSKCBLoIAsgQKyBArIEiggS6CALIECsgQKyBIoIEuggCyBArIECsgSKCBLoIAsgQKyBArIEiggS6CALIECsgQKyBIoIEuggCyBArIECsgSKCBLoIAsgQKyBArIejh6AP/3fjqNlzmPnnFXtm07esI9erp0FKi4Oad/GO7Bx6WjJx6QJVBAlkABWQIFZAkUkCVQQJZAAVkCBWQJFJAlUECWQAFZAgVkCRSQJVBAlkABWQIFZAkUkCVQQJZAAVkCBWQJFJAlUECWQAFZAgVkCRSQJVBAlkABWQIFZAkUkCVQQJZAAVkCBWQJFJAlUECWQAFZAgVkCRSQJVBAlkABWQIFZAkUkCVQQJZAAVkCBWQJFJAlUECWQAFZAgVkCRSQJVBAlkABWQIFZAkUkCVQQJZAAVkCBWQJFJAlUECWQAFZAgVkCRSQJVBAlkABWQIFZAkUkCVQQJZAAVkCBWQJFJAlUECWQAFZAgVkCRSQJVBAlkABWQIFZAkUkCVQQJZAAVkCBWQJFJAlUECWQAFZAgVkCRSQJVBAlkABWQIFZC37vn//42X5O8b4uN0cLngeY7wdPeLOPA1/57/tad/3x8/HqwIF8Js88YAsgQKyBArIEiggS6CALIECsgQKyBIoIEuggKx/iyYx8IKafNMAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 360x360 with 7 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "from matplotlib import ticker\n",
    "fig,_ = plt.subplots(figsize=(5,5))\n",
    "_.remove()\n",
    "fig.subplots_adjust(wspace=0, hspace=0)\n",
    "gs = fig.add_gridspec(ncols=3, nrows=3)\n",
    "\n",
    "ax1 = fig.add_subplot(gs[0,0])\n",
    "ax1.spines['right'].set_color('none')\n",
    "ax1.spines['bottom'].set_color('none')\n",
    "\n",
    "ax2 = fig.add_subplot(gs[1:,0])\n",
    "ax2.spines['top'].set_color('none')\n",
    "\n",
    "ax3 = fig.add_subplot(gs[0,1:])\n",
    "ax3.spines['left'].set_color('none')\n",
    "\n",
    "ax4 = fig.add_subplot(gs[1,1])\n",
    "ax4.set_facecolor('red') \n",
    "ax5 = fig.add_subplot(gs[1,2])\n",
    "ax5.spines['bottom'].set_color('none')\n",
    "\n",
    "ax6 = fig.add_subplot(gs[2,1])\n",
    "ax6.spines['right'].set_color('none')\n",
    "\n",
    "ax7= fig.add_subplot(gs[2,2])\n",
    "ax7.spines['left'].set_color('none')\n",
    "ax7.spines['top'].set_color('none')\n",
    "\n",
    "for ax in [ax1,ax2,ax3,ax4,ax5,ax6,ax7]:\n",
    "    ax.xaxis.set_major_locator(ticker.NullLocator())\n",
    "    ax.yaxis.set_major_locator(ticker.NullLocator())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.1"
  },
  "widgets": {
   "application/vnd.jupyter.widget-state+json": {
    "state": {},
    "version_major": 2,
    "version_minor": 0
   }
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
